﻿@using Mvc.JQuery.DataTables
@using Mvc.JQuery.DataTables.Example.Controllers
@using Mvc.JQuery.DataTables.Models
@using Mvc.JQuery.DataTables.Serialization
@using Mvc.JQuery.DataTables

<script type="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/highlight.min.js" language="javascript">
</script>

<script type="text/javascript" src="//cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script>
<link rel="stylesheet" href="//cdn.datatables.net/1.10.0/css/jquery.dataTables.css" />
<!-- table tools (csv export etc) https://datatables.net/extensions/tabletools -->
<script type="text/javascript" src="//cdn.datatables.net/tabletools/2.2.1/js/dataTables.tableTools.min.js"></script>
<link rel="stylesheet" href="//cdn.datatables.net/tabletools/2.2.1/css/dataTables.tableTools.css" />

<script type="text/javascript" src="/Content/jquery_datatables_column_filter/jquery-ui-timepicker-addon.js"></script>
<link rel="stylesheet" href="/Content/jquery_datatables_column_filter/jquery-ui-timepicker-addon.css" />

<link rel="stylesheet" href="/Content/jquery_datatables_column_filter/media/js/jquery.dataTables.columnFilter.css" />
<script type="text/javascript" src="/Content/jquery_datatables_column_filter/media/js/jquery.dataTables.columnFilter.js"></script>

<link rel="stylesheet" href="//cdn.datatables.net/colvis/1.1.1/css/dataTables.colVis.css" />
<script type="text/javascript" src="//cdn.datatables.net/colvis/1.1.1/js/dataTables.colVis.min.js"></script>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="col-md-2" id="facetControls">
               <div><div>Filter by IsAdmin:</div><span id="IsAdminFilter"> </span></div>
               <div><div>Filter by Hired:</div><span id="HiredFilter">   </span></div>
               <div><div>Filter by Email:</div><span id="EmailFilter">   </span></div>
               <div><div>Filter by Position:</div><span id="PositionFilter"></span></div>

        </div>
        <div class="col-md-10">

            @{
                var vm = Html.DataTableVm("table-id", (FacetController h) => h.GetFacetedUsers(null));

                vm.UseColumnFilterPlugin = true;
                vm.StateSave = true;

                vm.PageLength = 5; //... and set a default
                vm.ShowPageSizes = false;
                vm.ColVis = true;
                vm.ShowFilterInput = false;
                vm.Filter = true;
                vm.HideHeaders = false;
                vm.TableTools = false;
                vm.HideHeaders = true;
            }

            @Html.Partial("DataTable", vm)
        </div>
    </div>
</div>